About ViSta Applets

Applets are code written in Lisp, ViSta's underlying programming language. Applets provide the user with a way to run ViSta and have it perform a specialized set of calculations specified by of the applet, while providing the programmer control over the initial appears of ViSta. Applets can also cause an already running instance of ViSta to perform the calculations. 

Applets can be delivered over a network to a client and can be run without the standard ViSta logo and desktop windows being shown.

An applet file can contain exactly one function: the applet function. This is not a limitation, however, since the function can contain any desired code. The APPLET function has the following form:

(applet name args forms)

Where NAME is the name of the applet, ARGS is a list of arguments, and FORMS is a series of Lisp statements.  For example:

(applet @see-data (&key (exit t) (hide-desktop t) 
                        (hide-logo nil) )
  (load-data)
  (visualize-data :dialog nil)
  (when exit 
     (send (send *current-spreadplot* :container) 
                  :make-close-menu
           (list (send menu-item-proto 
                   :new "Show DeskTop"
                   :action (lambda () 
                     (send *spreadplot-container*
                          :hide-window)
                     (show-desktop)))
                 (send menu-item-proto 
                   :new "Exit ViSta" 
                   :action (lambda () (vista-exit))) 
            ))))

specifies an applet named @see-data which has arguments that cause the desktop and logo to be hidden, and which has statements that load data and visualizes it.

  NAME is the symbolic name of the applet. By convention, the name starts with the @ character.

  ARGS is a list of arguments. In addition to whatever arguments you wish to include, you may take advantage of built-in, pre-defined keyword arguments which control the display of ViSta's DeskTop, XLispStat and (at startup only) Logo Window. These arguments are: Hide-Desktop, Hide-Logo, and Hide-XLispStat (and their anti-aliases Show-DeskTop, Show-Logo and Show-XLispStat). The defaults of these arguments are the values of the global system variables *hide-desktop*, *hide-logo*, and *hide-xlispstat*. The default values for these global variables cause the DeskTop and Logo windows to be seen at startup, while the XLispStat window is not shown. 

  FORMS is any series of Lisp statements.
